﻿using System;

namespace ManageDto
{
    /// <summary>
    /// 机构数据
    /// </summary>
    [Serializable]
    public sealed class CompanyDto
    {
        /// <summary>
        /// 实体构造
        /// </summary>
        public CompanyDto()
        {
            this.CompanyId = Guid.NewGuid().ToString("N");
        }

        public string CompanyId { get; set; }
        public string ParentId { get; set; }
        public string CompanyCode { get; set; }
        public int CompanyCategory { get; set; }
        public string FullName { get; set; }
        public string ParentName { get; set; }
        public string Manager { get; set; }
        public string Province { get; set; }
        public string City { get; set; }
        public string County { get; set; }
        public string WebAddress { get; set; }
        public DateTime? FoundedTime { get; set; }

        public int Sort { get; set; }
        public string BusinessID { get; set; }
        public string ModifyUserId { get; set; }

        public string FoundedTimeWith
        {
            get 
            {
                if (this.FoundedTime.HasValue)
                    return this.FoundedTime.Value.ToShortDateString();
                else
                    return "";
            }
        }
    }
}
